home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
the_independent.swf
/
scripts
/
DefineSprite_25_fpsCounter
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
528b
|
23 lines
startTime = getTimer() / 1000;
frames = 0;
tenSec = 0;
tenTotal = 0;
this.onenterframe = function()
{
frames++;
if(getTimer() - startTime > count)
{
count += 1000;
tenTotal += math.round(3.225806451612903 * frames);
tenSec++;
fps.text = "1 sec: " + math.round(3.225806451612903 * frames) + "%";
if(tenSec == 10)
{
tenfps.text = "10 sec: " + math.round(tenTotal / 10) + "%";
tenSec = 0;
tenTotal = 0;
}
frames = 0;
}
};